import { BasicColumn, FormSchema } from "/@/components/Table"
import { h } from "vue"
import { render } from "/@/utils/common/renderUtils"
import { DescItem } from "/@/components/Description/index"

export enum PayStatus {
  /** 支付订单不存在 */
  PAY_NO_EXIST = "-1",
  /** 待支付-未发生与第三方支付平台交互(比如聚合支付-动态码) */
  PAY_INIT = "0",
  /** 支付中-与第三方支付平台发生交互 */
  PAY_ING = "1",
  /** 支付成功 */
  PAY_SUCCESS = "2",
  /** 支付失败 */
  PAY_FAIL = "3",
  /** 支付已撤销 */
  PAY_CANCEL = "4",
  /** 订单关闭-超时关闭 */
  PAY_CLOSED = "6",

  // ========================= 退款相关的
  /** 未退款(退款订单生成) */
  REFUND_INIT = "10",
  /** 未发生实际退款 */
  REFUND_NONE = "11",
  /** 退款处理中 */
  REFUND_ING = "12",
  /** 退款成功, 表示单笔退款是否成功 */
  REFUND_SUCCESS = "13",
  /** 部分退款 */
  REFUND_SUB = "14",
  /** 全部退款 */
  REFUND_ALL = "15",
  /** 退款失败 */
  REFUND_FAIL = "16",
  /** 退款关闭 */
  REFUND_CLOSE = "17",
  /** 退款异常 */
  REFUND_CHANGE = "18",
}


export const RefundFormSchema: FormSchema[] = [
  {
    field: "orderNo",
    label: "订单号",
    component: "Input",
    componentProps: {
      readonly: true,
    },
  },
  {
    field: "orderGoodsInfo",
    label: "商品信息",
    component: "InputTextArea",
    componentProps: {
      readonly: true,
      autoSize: {
        minRows: 1,
        maxRows: 8,
      },
    },
  },
  
  {
    field: "refundPrice",
    label: "退款金额(元)",
    component: "InputNumber",
    required: true,
    componentProps: {
      placeholder: "请输入退款金额",
    },
  },
  {
    field: "refundReason",
    label: "退款原因",
    component: "Input",
    required: true,
    componentProps: {
      placeholder: "请输入退款原因",
    },
  },
]
